#include <REGX52.H>
#include "uart.c"
#include "game.h"
#include "display.c"
/**
 * 实现Speed界面
 */
sbit button_speedup = P1^5;
sbit button_speeddown = P1^4;
unsigned char i = 0;
void main()
{
   
    uart_init();
    display_init();
    display_speed_select_screen();
    display_speed_select_num(i);
    while(1){
        if(button_speedup==0){
            i++;
            while(~button_speedup);
            if (i>9)i=0;
    
            display_speed_select_num(i);
        while(~button_speedup);
        }
        if(button_speeddown==0){
            i--;
            while(~button_speeddown);
            if(i<0||i>9)
            i=9;
            display_speed_select_num(i);
        }
    }
    while (1)
    {
    }
}